<template>
  <div>
    <el-row>
      <el-col :span="4">
        <div class="user-icon">
          <el-avatar :src="image" :size="size" />
          <div class="icon-group">
            <el-badge :value="20" class="badge">
              <el-icon :size="20" color="white">
                <ChatRound />
              </el-icon>
            </el-badge>
            <el-icon :size="20" color="white">
              <Files />
            </el-icon>
            <el-icon :size="20" color="white">
              <ChromeFilled />
            </el-icon>
          </div>
          <div class="icon-bottom">
            <el-icon :size="20" color="white">
              <Setting />
            </el-icon>
          </div>
        </div>
      </el-col>
      <el-col :span="20">
        <div class="message-group">
          <div class="message" v-for="(item, index) in 10" :key="index">
            <div class="message-left">
              <div class="avator">
                <el-avatar :src="image" :size="45" shape="square" />
              </div>
              <div class="info">
                <p style="color: #505050">dab</p>
                <p style="color: c2c2c3; margin-top: 10px">我要下来</p>
              </div>
            </div>
            <div class="message-right">
              <p class="message-time">15:46</p>
            </div>
          </div>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script lang="ts" setup>
import { defineProps } from 'vue'
// import { ChartDotRound } from '@element-plus/icons-vue'
defineProps({
  image: String,
  size: Number
})
console.log()
</script>

<style lang="scss" scoped>
.el-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}

.el-avatar {
  margin-top: 20px;
}

.user-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 50rem;
  background: #2e2e2e;
  position: relative;
}

.icon-group {
  display: flex;
  height: 6.25rem;
  margin-top: 20px;
  flex-direction: column;
  justify-content: space-between;

  .el-icon {
    cursor: pointer;
  }
}

.icon-bottom {
  position: absolute;
  bottom: 0;

  .el-icon {
    padding-bottom: 25px;
    cursor: pointer;
  }
}

/* 消息界面 */
.message-group {
  height: 50rem;
  border-top: 1px solid #e7e7e7;
  border-bottom: 1px solid #e7e7e7;

  .message {
    height: 5rem;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 0 10px;
    align-items: center;
    /*background: #e4e5e6; */

    .message-left {
      display: flex;
      flex-direction: row;
      align-items: center;

      .info {
        margin-left: 15px;
        margin-top: 20px;
        font-size: 15px;
      }
    }
  }
  .message:hover {
    background: #e1dfdd;
  }
}
</style>
